package hot100;

/**
 * @Author: wzp
 * @CreateTime: 2024-09-07  14:05
 * @Description: 移动0
 * @Version: 1.0
 */
public class hot_283 {
    public void moveZeroes(int[] nums) {
        int index=0;
        for (int i=0;i<nums.length;i++){
            if(nums[i]!=0){
                nums[index++]=nums[i];
            }
        }
        while (index<nums.length){
            nums[index++]=0;
        }
    }



}
